//
//  PongFieldController.h
//
//  Created by Jonathan Saggau on 2007-08-09.
//  Copyright (c) 2007 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Common.h"

@class PongField;
@class ServerController;
@class ClientController;

@interface PongFieldController : NSObject
{
	PongField *field;
	id delegate;
	int rotation;
	
	float stepX;
    float stepY;
    BOOL updating;

	ServerController *serverController;
	ClientController *clientController;
}

//Delegate method
//-(void)gameDidEnd;

-(id)initWithFieldRect:(CGRect) fieldRect;

-(void)beginNewGame;
-(void)endGame;

- setRotation:(int)rot;

-(void)update;
-(PongField *)field;

- (id)delegate;
- (void)setDelegate:(id)aDelegate;

-(void)serverControllerDidBork:(NSException *)e;
-(void)clientControllerDidBork:(NSException *)e;

@end
